/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import BO.LabBO;
import java.util.Date;
import java.util.List;
import pojo.Lab;
import ulti.DateUlti;

/**
 *
 * @author phong
 */

public class LabListBean {

    private String useDate = DateUlti.formatDate(DateUlti.addDays(DateUlti.getNow(),1), "MM/dd/yyyy");
    private String timeTableId = "T1";
    private List<Lab> labs;

    public LabListBean() {    
    }

    public LabListBean(List<Lab> labs) {
        this.labs = labs;
    }

    public void setLabs(List<Lab> labs) {
        this.labs = labs;
    }

    public List<Lab> getLabs() {
        return labs;
    }

    public String getTimeTableId() {
        return timeTableId;
    }

    public void setTimeTableId(String timeTableId) {
        this.timeTableId = timeTableId;
    }

    public String getUseDate() {
        return useDate;
    }

    public void setUseDate(String useDate) {
        this.useDate = useDate;
    }

    //Chuc nang
    //<editor-fold defaultstate="collapsed" desc="Lấy thông tin Lab thông qua id">
    public Lab getLabByID(String id) {
        return LabBO.getLabByID(id);
    }
    //</editor-fold>  

    //<editor-fold defaultstate="collapsed" desc="Lấy danh sách các Lab free tai 1 thoi diem">
    public List<Lab> freeLabByTime() {
        this.labs = LabBO.getFreeLabByTime(new Date(useDate), timeTableId);        
        return this.labs;
    }
    //</editor-fold>   
}
